//
//  SecondView.m
//  A_GOGO
//
//  Created by Liuiu on 16/1/22.
//  Copyright © 2016年 www.lanou3g.com. All rights reserved.
//

#import "SecondView.h"
#import "GameTableViewCell.h"

//原来view里没有这句,这叫创建延展
@interface SecondView ()<UITableViewDelegate,UITableViewDataSource>
@property (nonatomic, retain) UITableView *usualTableView; //常用论坛的tableView
//@property(nonatomic, retain) UILabel *label;
@end


@implementation SecondView
- (void)dealloc
{
    [_usualTableView release];

    [super dealloc];
}





- (void)data
{
    
}
- (instancetype)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
        self.usualTableView =[[UITableView alloc]initWithFrame:self.frame style:UITableViewStylePlain];
        _usualTableView.delegate = self;
        _usualTableView.dataSource = self;
        [self addSubview:self.usualTableView];
        [_usualTableView release];
        
        //注册重用池
        [self.usualTableView registerClass:[GameTableViewCell class] forCellReuseIdentifier:@"cell" ];
        [self data];
    }
    return self;
}
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
    GameTableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"cell" forIndexPath:indexPath];
    
    cell.backgroundColor = [UIColor redColor];
    return cell;
}
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
{
    return 50;
}




/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
    // Drawing code
}
*/




@end
